<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>

<rapid:override name="head">
	<title>Shelf编辑</title>
</rapid:override>

<rapid:override name="content">
    <div class="navigation">資產管理 > 書架訊息> 修改</div>
	<form:form class="form-horizontal" method="put" action="${ctx}/shelf/${shelf.shelfId}" modelAttribute="shelf">
		<div class="handleControl">
		<input id="submitButton" class="btn btn-default" name="submitButton" type="submit" value="提交" />
		<input type="button" class="btn btn-default" value="返回列表" onclick="window.location='${ctx}/adminuser'"/>
		<input type="button" class="btn btn-default" value="后退" onclick="history.back();"/>
		</div>
		<div class="gridTable">
		<table class="formTable">
		<table width="100%"  border="0" cellspacing="0" class="table text-center">
		<%@ include file="form_include.jsp" %>
		</table>
		</table>
		</div>
	</form:form>
	
	<script>		
		new Validation(document.forms[0],{onSubmit:true,onFormValidate : function(result,form) {
			var finalResult = result;
			
			//在这里添加自定义验证			
			return disableSubmit(finalResult,'submitButton');
		}});
	</script>
	<style type="text/css">
		span.required{
			color:red;
			font-weight: bold;
		}
		input.required, textarea.required {
			border: 1px solid #00A8E6;
		}
	</style>
</rapid:override>
<rapid:override name="script">
<script>
var picker1 = new Pikaday(
		    {
		        field: document.getElementById('createTimeString'),
		        firstDay: 1,
		        minDate: new Date('1900-01-01'),
		        maxDate: new Date('2020-12-31'),
		        yearRange: [1900,2020]
		    });
</script>
</rapid:override>
<%@ include file="base.jsp" %>